<template>
  <div>
    <el-container style="height: 720px; border: 1px solid #eee">
      <el-header style="font-size: 42px; background-color: rgb(137, 207, 240)"
        >
         <div style="float: right;" >
      <i class="el-icon-user-solid"></i>
      <span style="font-size: 18px; margin-left: 10px;">用户名</span>
    </div> 
        碳核算和碳交易系统</el-header>
      <el-container>
        <el-aside width="220px" style="border: 1px solid #eee; background-color: lightblue;">
          <el-menu :default-openeds="['3','1']" style="background-color: lightblue;" >
            <el-submenu index="3" >
              <template slot="title"><i class="el-icon-s-custom" ></i>企业信息</template>
               <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="3-1" @click="inf" id="jiben" >企业基本信息</el-menu-item>
              
              </el-menu-item-group>
              <el-submenu index="3-4" style="background-color: lightblue;">
          <template slot="title" >碳排放数据核算</template>
          <el-menu-item index="3-4-6"  @click="zp" style="background-color: lightblue;">图形化预测</el-menu-item>
          <el-menu-item index="3-4-1"  @click="shuju" style="background-color: lightblue;">活动数据</el-menu-item>
          <el-menu-item index="3-4-2"  @click="device" style="background-color: lightblue;">排放因子</el-menu-item>
          <el-menu-item index="3-4-3"  @click="time" style="background-color: lightblue;">温室气体间接排放清单</el-menu-item>
          <el-menu-item index="3-4-4"  @click="test" style="background-color: lightblue;">核查及证明材料</el-menu-item>
          <el-menu-item index="3-4-5"  @click="pi" style="background-color: lightblue;">核查及证明材料</el-menu-item>
        </el-submenu>
            </el-submenu>
            <el-submenu index="1" >
              <template slot="title"
                ><i class="el-icon-s-custom" ></i>碳核算</template
              >
              <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="1-1" @click="sel" >行业选择</el-menu-item>
                <el-menu-item index="1-2" @click="ind">碳排放录入</el-menu-item>
                <el-menu-item index="1-3" @click="see" >碳报告的生成和审核</el-menu-item>
                <el-menu-item index="1-4" @click="line">碳报告区块链</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="5">
              <template slot="title"
                ><i class="el-icon-s-claim"></i>碳交易</template
              >
              <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="5-1" @click="ce">碳额度查询</el-menu-item>
                <el-menu-item index="5-4" @click="tff">碳币发放和兑换</el-menu-item>
                <el-menu-item index="5-2" @click="tjy">碳额度碳币交易</el-menu-item>
                <el-menu-item index="5-3" @click="pv">个人资产与交易记录</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="10">
              <template slot="title"
                ><i class="el-icon-s-claim"></i>审核员</template
              >
              <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="10-1" @click="dc">碳排放数据审核</el-menu-item>
                <el-menu-item index="10-2" @click="sp">报告审批</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="8">
              <template slot="title"
                ><i class="el-icon-s-data"></i>管理员</template
              >
              <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="8-4" @click="mlogin">管理员认证</el-menu-item>
                <el-menu-item index="8-1" @click="um">用户管理</el-menu-item>
                <el-menu-item index="8-2" @click="xt">系统配置</el-menu-item>
                <el-menu-item index="8-3" @click="bg">报告管理</el-menu-item>
                
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="2">
              <template slot="title"
                ><i class="el-icon-office-building"></i>第三方</template
              >
              <el-menu-item-group style="background-color: lightblue;">
                <el-menu-item index="2-1" @click="lh">监管机构登录</el-menu-item>
                <el-menu-item index="2-2" @click="sa">全面数据搜索查询</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <router-view></router-view>
      </el-container>
    </el-container>
  </div>
</template>
<script>
// import router from "@/router";
export default {
  components: {},
  data() {
    return {
    };
  },

  methods: {
    zp(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/zp") {
        this.$router.push("/zp");
      }
    },
    bg(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/bg") {
        this.$router.push("/bg");
      }
    },
    xt(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/xt") {
        this.$router.push("/xt");
      }
    },
    um(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/um") {
        this.$router.push("/um");
      }
    },
    mlogin(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/mlogin") {
        this.$router.push("/mlogin");
      }
    },
    sa(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/sa") {
        this.$router.push("/sa");
      }
    },
    lh(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/lh") {
        this.$router.push("/lh");
      }
    },
    sp(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/sp") {
        this.$router.push("/sp");
      }
    },
    dc(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/dc") {
        this.$router.push("/dc");
      }
    },
    tff(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/tff") {
        this.$router.push("/tff");
      }
    },
    tjy(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/tjy") {
        this.$router.push("/tjy");
      }
    },
    pv(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/pv") {
        this.$router.push("/pv");
      }
    },
    ce(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/ce") {
        this.$router.push("/ce");
      }
    },
    line(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/line") {
        this.$router.push("/line");
      }
    },
    see(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/see") {
        this.$router.push("/see");
      }
    },
    ind(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/ind") {
        this.$router.push("/ind");
      }
    },
    sel(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/sel") {
        this.$router.push("/sel");
      }
    },
        inf(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/inf") {
        this.$router.push("/inf");
      }
    },
    data(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/data") {
        this.$router.push("/data");
      }
    },

    device(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/dev") {
        this.$router.push("/dev");
      }
    },
    time(){
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/time") {
        this.$router.push("/time");
      }
    },
    pi() {
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/pi") {
        this.$router.push("/pi");
      }
    },
    shuju() {
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/out") {
        this.$router.push("/out");
      }
    },
    test() {
      const currentRoute = this.$router.currentRoute;
      if (currentRoute.path !== "/test") {
        this.$router.push("/test");
      }
    },
  },
  // mounted() {
  //   router.push("/dept");
  // },
};
</script>

<style scoped>
.dropdown-content {
  display: block;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 150px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.dropdown-content div {
  padding: 12px 16px;
  text-decoration: none;
  color: black;
  display: block;
}
.el-aside{
  height: calc(100vh - 60px);
}
.dropdown-content div:hover {
  background-color: #f1f1f1;
}
</style>
